// JavaScript Document

function CreateXMLHttpRequest()
{
	if (window.XMLHttpRequest )
	{
		return new XMLHttpRequest()
	}
	else if (window.ActiveXObject )
	{
		return new ActiveXObject("Microsoft.XMLHTTP")
	}
}

function PhanTrang(MaDanhMuc, page)
{
	xmlHttp = CreateXMLHttpRequest();
	
	xmlHttp.onreadystatechange = function()
	{
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
		{
			var kq = xmlHttp.responseText;
			document.getElementById("SanPhamByDanhMuc").innerHTML = kq;
		}
	}
	
	var serverURL = "components/danhmuc/detail_detail.php?MaDanhMuc="+MaDanhMuc+"&page="+page;
	serverURL += "&t" + new Date().getTime();
	
	xmlHttp.open("GET", serverURL, true);
	xmlHttp.send(null);
}